package com.health.constant;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @Description
 * @Author konglz
 * @Data 2023/3/27 18:28
 */
@Component
public class AliyunProperty {
    @Value("${aliyun.accessKey}")
    private String accessKey;
    @Value("${aliyun.secretKey}")
    private String secretKey;
    @Value("${aliyun.bucket}")
    private String bucket;

    @Value("${aliyun.endpoint}")
    private String endpoint;

    public static String ACCESSKEY;
    public static String SECRETKEY;
    public static String BUCKET;
    public static String ENDPOINT;

    @PostConstruct
    public void init(){
        ACCESSKEY = this.accessKey;
        SECRETKEY = this.secretKey;
        BUCKET = this.bucket;
        ENDPOINT = this.endpoint;
    }
}
